package routers

import (
	"api_admin_server/internal/controllers"
	"api_admin_server/internal/middleware"

	"github.com/gin-gonic/gin"
)

func RegisteUser(engine *gin.Engine) {
	authApi := engine.Group("auth/user/d").Use(middleware.VerifyToken())
	user := new(controllers.UserController)
	authApi.POST("/list", user.GetDuserList)
	authApi.POST("/photos/update", user.UpdateUserPhotos)
	authApi.POST("/sex/update", user.UpdateUserSex)
	authApi.POST("/body_data/update", user.UpdateBodyData)
	authApi.GET("/audit/list", user.GetUserAuditByUids)
	authApi.POST("/audit/action", user.DoUserAuditAction)
	authApi.POST("/disabled", user.DisabledUser)
	authApi.POST("/platform_discount/update", user.UpdatePlatformDiscount)

	cauthApi := engine.Group("auth/user/c").Use(middleware.VerifyToken())
	cauthApi.POST("/list", user.GetCuserList)
	cauthApi.POST("/update", user.UpdateCuser)
}
